<HTML><HEAD><TITLE>+Goal1 ; +Goal2</TITLE>
</HEAD><BODY>[ <A HREF="index.html">Control</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>+Goal1 ; +Goal2</H1>
Semicolon (OR) operator - Succeeds if the goal Goal1 succeeds or if the
goal Goal2 succeeds.


<DL>
<DT><EM>Goal1</EM></DT>
<DD>Atom or compound term.
</DD>
<DT><EM>Goal2</EM></DT>
<DD>Atom or compound term.
</DD>
</DL>
<H2>Description</H2>
	Succeeds if either of Goal1 and Goal2 succeeds.
<P>
	If Goal1 has the special form A -&gt; B (or A *-&gt; B) then the disjunction
	turns into an if-then-else construct. See those predicates for details.
<P>
	!/0 cuts through ;/2.

<H3>Modes and Determinism</H3><UL>
<LI>;(+, +) is nondet
</UL>
<H3>Modules</H3>
This predicate is sensitive to its module context (tool predicate, see @/2).
<H3>Fail Conditions</H3>
Fails if both Goal1 and Goal2 fail
<H3>Resatisfiable</H3>
Resatisfiable if Goal1 does not contain a literal cut
<H2>Examples</H2>
<PRE>
Success:
      1 == 2; 2 == 2.

      [eclipse]: (write(a), fail) ; (write(b); write(c)).
      ab
      yes.

      [eclipse]: (write(a); write(b)), write(c).
      ac
      yes.

Fail:
      1 == 2; 3 == 2.



</PRE>
<H2>See Also</H2>
<A HREF="../../kernel/control/I-0.html">! / 0</A>, <A HREF="../../kernel/control/-G-2.html">-> / 2</A>, <A HREF="../../kernel/control/X-G-2.html">*-> / 2</A>
</BODY></HTML>
